package com.example.demo.spring;

/**
 * @author Rocket
 * @version 10.0.1
 * @date 2021-08-22 1:27 PM
 */
public final class UserFactory {

    public static User getUsers(Class<? extends User> u) {
        if(u.getSimpleName().equals("AdminUser")) {
            return new AdminUser();
        } else if(u.getSimpleName().equals("DomainUser")) {
            return new DomainUser();
        }

        return null;
    }

}
